"""Add email column

Revision ID: f167115c7c4a
Revises: 3347fac2c83d
Create Date: 2025-02-28 10:13:19.325212

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision: str = 'f167115c7c4a'
down_revision: Union[str, None] = '3347fac2c83d'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('publisher', sa.Column('publisher_id', sa.Integer(), autoincrement=True, nullable=False, comment='新闻发布者唯一编号'))
    op.drop_column('publisher', 'publisher_ids')
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('publisher', sa.Column('publisher_ids', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False, comment='新闻发布者唯一编号'))
    op.drop_column('publisher', 'publisher_id')
    # ### end Alembic commands ###
